package com.example.selectdorm.repo;

import com.example.selectdorm.entity.DormitoryRoom;
import org.springframework.data.domain.Example;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DormitoryRoomRepository extends JpaRepository<DormitoryRoom, Long> , JpaSpecificationExecutor {

    @Override
    DormitoryRoom getById(Long aLong);

    @Override
    List<DormitoryRoom> findAll(Specification spec);

    List<DormitoryRoom> findAllByUnitId(Long unitId);
}
